package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TLeaseManageAttachMapper;
import com.ruoyi.system.domain.TLeaseManageAttach;
import com.ruoyi.system.service.ITLeaseManageAttachService;
import com.ruoyi.common.core.text.Convert;

/**
 * 租赁管理附件信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-18
 */
@Service
public class TLeaseManageAttachServiceImpl implements ITLeaseManageAttachService 
{
    @Autowired
    private TLeaseManageAttachMapper tLeaseManageAttachMapper;

    /**
     * 查询租赁管理附件信息
     * 
     * @param id 租赁管理附件信息主键
     * @return 租赁管理附件信息
     */
    @Override
    public TLeaseManageAttach selectTLeaseManageAttachById(Long id)
    {
        return tLeaseManageAttachMapper.selectTLeaseManageAttachById(id);
    }

    /**
     * 查询租赁管理附件信息列表
     * 
     * @param tLeaseManageAttach 租赁管理附件信息
     * @return 租赁管理附件信息
     */
    @Override
    public List<TLeaseManageAttach> selectTLeaseManageAttachList(TLeaseManageAttach tLeaseManageAttach)
    {
        return tLeaseManageAttachMapper.selectTLeaseManageAttachList(tLeaseManageAttach);
    }

    /**
     * 新增租赁管理附件信息
     * 
     * @param tLeaseManageAttach 租赁管理附件信息
     * @return 结果
     */
    @Override
    public int insertTLeaseManageAttach(TLeaseManageAttach tLeaseManageAttach)
    {
        tLeaseManageAttach.setCreateTime(DateUtils.getNowDate());
        return tLeaseManageAttachMapper.insertTLeaseManageAttach(tLeaseManageAttach);
    }

    /**
     * 修改租赁管理附件信息
     * 
     * @param tLeaseManageAttach 租赁管理附件信息
     * @return 结果
     */
    @Override
    public int updateTLeaseManageAttach(TLeaseManageAttach tLeaseManageAttach)
    {
        tLeaseManageAttach.setUpdateTime(DateUtils.getNowDate());
        return tLeaseManageAttachMapper.updateTLeaseManageAttach(tLeaseManageAttach);
    }

    /**
     * 批量删除租赁管理附件信息
     * 
     * @param ids 需要删除的租赁管理附件信息主键
     * @return 结果
     */
    @Override
    public int deleteTLeaseManageAttachByIds(String ids)
    {
        return tLeaseManageAttachMapper.deleteTLeaseManageAttachByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除租赁管理附件信息信息
     * 
     * @param id 租赁管理附件信息主键
     * @return 结果
     */
    @Override
    public int deleteTLeaseManageAttachById(Long id)
    {
        return tLeaseManageAttachMapper.deleteTLeaseManageAttachById(id);
    }
}
